package sctu.edu.java.year2016.team05.wangliwei.day20160523.chapter7_3;

/**
 * 根据运行参数的个数决定循环打印变量i值的次数
 */
import java.util.Scanner;
public class DaYin  {
    public static void main(String[] args) {
        System.out.println("请输入w的值");
        Scanner scanner = new Scanner(System.in);
        int w=scanner.nextInt();
       int []a=new int[w];
        for(int k=0;k<w;k++)
            a[k]=k;
        if (a.length > 0)
            for (int i = 0; i < a.length; i++) {
                System.out.println(i + 1 + "参数");
            }
        else
            System.out.println("参数为空！");
    }
}
